﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LightLink.Model
{
    public class Stick
    {
        #region const status
        public const int Empty = 1;
        public const int Stock = 2;
        public const int Player = 3;

        public const int Slot_X_plus = 1;
        public const int Slot_X_minus = 2;
        public const int Slot_Y_plus = 4;
        public const int Slot_Y_minus = 8;
        #endregion

        #region status
        private int cell_state = 0;
        private int slot_state = 0;
        private int player_state = 0;
        private Dictionary<int, Stick> links = new Dictionary<int,Stick>();
        private List<Stick> brothers = null;
        #endregion

        #region Method
        
        #endregion
        #region properties

        public bool LinkUp
        {
            get { return (slot_state & Slot_Y_minus) != 0; }
        }
        public bool LinkDown
        {
            get { return (slot_state & Slot_Y_plus) != 0; }
        }
        public bool LinkLeft
        {
            get { return (slot_state & Slot_X_minus) != 0; }
        }
        public bool LinkRight
        {
            get { return (slot_state & Slot_X_plus) != 0; }
        }
        #endregion
    }
}
